package com.citymanage.demo.service.worker;


import com.citymanage.demo.mapper.worker.WorkerMapper;
import com.citymanage.demo.po.worker.Worker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkerManageService {
    @Autowired
    private WorkerMapper workerMapper;

    public Worker updateWorker(Integer key, String account, String phone,String password) {
       return workerMapper.updateWorker(key, account,phone,password);
    }

    public List<Worker> findAll(Integer key) {
        return workerMapper.findAll(key);
    }
    public List<Worker>selectWorker(){
        return workerMapper.selectWorker();
    }
    public Worker selectScore(Integer key){
        return workerMapper.selectScore(key);
    }
    public List<Worker> workerScore() {
        return workerMapper.workerScore();
    }
    public void updateWscore(Integer key,Integer wscore){
        workerMapper.updateWscore(key,wscore);
   }
    public void addWorker(Integer key, String account, String phone, String password) {
       workerMapper.addWorker(key, account,phone,password);
    }
}